/*

% Shader that implements structs.
date: 05/29/12

*/
float4x4 WorldViewProjection : WORLDVIEWPROJECTION; //after colon is a semantic usefull later for knowing what variables this shader has

/*****************Data Structures****************************/
struct VS_INPUT
{
	float4 ObjectPosition: POSITION0;
};
struct VS_OUTPUT
{
	float4 ScreenPosition: POSITION0;
};
struct PS_OUTPUT
{
	float4 Color:COLOR0;
};

/*****************Vertex Shader*****************************/
VS_OUTPUT vertex_shader(VS_INPUT IN)
{
	VS_OUTPUT OUT = (VS_OUTPUT)0; //memset clear garbage
	OUT.ScreenPosition = mul(IN.ObjectPosition, WorldViewProjection);
	return OUT;
}

/*****************Pixel Shader*******************************/
PS_OUTPUT pixel_shader(VS_OUTPUT IN)
{
	PS_OUTPUT OUT = (PS_OUTPUT)0;
	OUT.Color = float4(0.0, 0.0, 1.0, 1.0);
	return OUT;
}

/****************Techniques**********************************/
technique main
{
	pass p0 
	{
		VertexShader = compile vs_3_0 vertex_shader();
		PixelShader = compile ps_3_0 pixel_shader();
	}
}
